<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dzsq</title>
  <link rel="stylesheet" type="text/css" th:href="@{/user/css/bootstrap.min.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/user/css/style.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/user/css/font-awesome.min.css}">
  <link rel="apple-touch-icon-precomposed" th:href="@{/user/images/icon/icon.png}">
  <link rel="shortcut icon" th:href="@{/user/images/icon/favicon.ico}">
  <script th:src="@{/user/js/jquery-2.1.4.min.js}"></script>
  <!--[if gte IE 9]>
  <script th:src="@{/admin/js/jquery-1.11.1.min.js}" type="text/javascript"></script>
  <script th:src="@{/admin/js/html5shiv.min.js}" type="text/javascript"></script>
  <script th:src="@{/admin/js/respond.min.js}" type="text/javascript"></script>
  <script th:src="@{/admin/js/selectivizr-min.js}" type="text/javascript"></script>
  <![endif]-->
  <!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->
</head>

<body class="user-select">
<section class="container-fluid">
  <div th:replace="~{common/common::topbar}"></div>
  <div class="row">
    <div th:replace="~{common/common::sidebar(active='article')}"></div>
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
      <form method="post" >
        <h1 class="page-header">操作</h1>
        <ol class="breadcrumb">
          <li><a th:href="@{/toaddArticle}">增加文章</a></li>
        </ol>
        <h1 class="page-header">管理 <span class="badge">7</span></h1>
        <div class="table-responsive">
          <table class="table table-striped table-hover">
            <thead>
              <tr>
                <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">标题</span></th>
                <th><span class="glyphicon glyphicon-list"></span> <span class="visible-lg">栏目</span></th>
                <th class="hidden-sm"><span class="glyphicon glyphicon-tag"></span> <span class="visible-lg">标签</span></th>
                <th class="hidden-sm"><span class="glyphicon glyphicon-comment"></span> <span class="visible-lg">评论</span></th>
                <th><span class="glyphicon glyphicon-time"></span> <span class="visible-lg">日期</span></th>
                <th><span class="glyphicon glyphicon-pencil"></span> <span class="visible-lg">操作</span></th>
              </tr>
            </thead>
            <tbody>
              <tr th:each="article:${articles}">
                <td class="article-title" th:text="${article.getTitle()}"></td>
                <td th:text="${article.getType()}"></td>
                <td class="hidden-sm" th:text="${article.getLabels()}"></td>
                <td class="hidden-sm" th:text="${article.getCommentsNum()}"></td>
                <td th:text="${#dates.format(article.getDate(),'yyyy-MM-dd')}"></td>
                <td><a th:href="@{/toUpdataArticle}+${article.getId()}">修改</a>
                  <a th:href="@{/deleteArticle}+${article.getId()}">删除</a></td>
              </tr>
            </tbody>
          </table>
        </div>
      </form>
    </div>
  </div>
</section>

<div th:replace="~{common/common::info}"></div>
</body>
</html>
